import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
//导入全局样式表
import '@/assets/CSS/global.css'
//导入字体图标 
import '@/assets/fonts/iconfont.css'

import axios from 'axios'
//配置请求的根路径
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
Vue.prototype.axios = axios

//导入全局样式
import '@/assets/CSS/global.css'

//导入iconfont.css文件，使用阿里字体图标
import '@/assets/fonts/iconfont.css'

Vue.config.productionTip = false

//导入 axios ,并挂载 Vue 原型上，后续可有利用 this.axios 直接访问
import axios from 'axios'
//配置请求的路径
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
    //设置请求拦截器
axios.interceptors.request.use(config => {
    //挂载请求头
    config.headers.Authorization = window.sessionStorage.getItem('token');
    //在最后必须 return config
    return config;
})

Vue.prototype.axios = axios;

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')